import java.util.Scanner;

public class text1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入左范围");
        int left = sc.nextInt();
        System.out.println("请输入右范围");
        int right = sc.nextInt();
        for (int i = left; i <= right; i++) {
            int x = i;
            int f = 0;
            while (x != 0) {
                int ge = x % 10;
                x = x / 10;
                if (ge == 7) {
                    System.out.println("过");
                    f = 1;
                    break;
                }
            }
            if(f == 1){
                continue;
            }
            if (i % 7 == 0) {
                System.out.println("过");
            }else{
                System.out.println(i);
            }
        }

    }
}
